import Vue from 'vue'

import Cookies from 'js-cookie'
import './style/reset.scss'
import './style/common.scss'
import 'element-ui/lib/theme-chalk/display.css'
import 'normalize.css/normalize.css'
import VueClipboard from 'vue-clipboard2'

import Element from 'element-ui'
//
import mavonEditor from 'mavon-editor'
import 'mavon-editor/dist/css/index.css'

// 数据字典
import dict from './components/Dict'

// 权限指令
import permission from './components/Permission'
import './assets/styles/element-variables.scss'
// global css
import './assets/styles/index.scss'

// 代码高亮
import VueHighlightJS from 'vue-highlightjs'
import 'highlight.js/styles/atom-one-dark.css'

// 省市区级联选择
import VueAreaLinkage from 'vue-area-linkage'
import 'vue-area-linkage/dist/index.css'
// 引入echarts
import echarts from 'echarts'
Vue.prototype.$echarts = echarts
import App from './App'
import store from './store'
import router from './router/routers'
import { CountDown } from 'vant'
import './assets/icons' // icon
import './router/index' // permission control
import { showLoading, hideLoading, duduxia } from '@/api/loadding'
import { getCountDown } from '@/utils'
import axios from 'axios'
Vue.prototype.$getCountDown = getCountDown

Vue.prototype.$showLoading = showLoading
Vue.prototype.$hideLoading = hideLoading
Vue.prototype.$axios = axios
Vue.prototype.$duduxia = duduxia
// 数字校验
import onlyNumber from '@/onlyNumber'
Vue.use(onlyNumber)

// 时间格式化处理
import moment from 'moment'
Vue.prototype.$moment = moment
import './mock/index.js'//此部分引入的是我们所编写的mockjs文档
Vue.use(VueHighlightJS)
Vue.use(CountDown)
Vue.use(mavonEditor)
Vue.use(permission)
Vue.use(dict)
Vue.use(VueAreaLinkage)
Vue.use(Element, {
  size: Cookies.get('size') || 'small' // set element-ui default size
})
Vue.use(VueClipboard)

Vue.config.productionTip = false

new Vue({
  el: '#app',
  router,
  store,
  render: h => h(App)
})
